<template>
    <div>
        <!--详情弹出框 -->
        <el-dialog title='详情' :visible.sync='detailVisible' width='60%'>
            <!--数据表格体-->
            <el-table
                :data='tableData'
                border
                height='450'
                class='table'
                ref='multipleTable'
                header-cell-class-name='table-header'
                @selection-change='handleSelectionChange'
            >
<!--                <el-table-column type='selection' width='55' align='center'></el-table-column>-->
                <el-table-column type='index' width='55' label='序号' align='center'></el-table-column>
                <el-table-column prop='productName' label='商品名称' align='center'></el-table-column>
                <el-table-column prop='productCode'  label='商品编码' align='center'></el-table-column>
                <el-table-column prop='productMoney'  label='商品单价(元)' align='center'></el-table-column>
                <el-table-column prop='num'  label='购买数量' align='center'></el-table-column>
                <el-table-column prop='orderItemAmount'  label='细单总金额(元)' align='center'></el-table-column>
                <el-table-column prop='warehouseName'  label='仓库名称' align='center'></el-table-column>


<!--                <el-table-column prop='orderAmount' label='订单金额(元)' align='center'>-->
<!--                    <template slot-scope='scope'>-->
<!--                        <span style='color: sandybrown;font-size: large'>-->
<!--                        {{ scope.row.orderAmount | priceFilter }}-->
<!--                        </span>-->
<!--                    </template>-->
<!--                </el-table-column>-->

            </el-table>

        </el-dialog>

    </div>
</template>

<script>
export default {
    name: 'detailOrder',
    data() {
        return {
            //是否展示
            detailVisible: false,
            tableData:'',//表单
            multipleSelection:[],//多选值
        };
    },
    methods: {
        //初始化
        init(param) {
            //初始化清除表单验证
            this.$http.post(this.global.BASIC_SERVER+'/orderController/showOrderDetail.json', param).then(res => {
                if (res.data.status) {
                    this.tableData=res.data.data;
                    this.detailVisible = true;
                }
            });
        },
        // 多选操作
        handleSelectionChange(val) {
            this.multipleSelection = val;
        }
    }
};
</script>

<style scoped>
.upload-demo {
    /*margin-left: 100px;*/
}
</style>
